package resizeTest;

import java.awt.Canvas;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Graphics;

public class ResizeTest extends Canvas{
	private static final long serialVersionUID = 1L;

   public static void main(String[] args){
      Frame frame = new Frame();
      frame.setSize(300, 200);
      frame.setLocationRelativeTo(null);
      frame.setVisible(true);
	  frame.add( new ResizeTest() );
    }
   
    public void paint (Graphics g){
       Dimension wndSize = getSize();
	   g.setColor( Color.BLACK );
       g.drawOval(0,0,wndSize.width, wndSize.height);
       }
    }